package org.example.logdemo.Controller;

import jakarta.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class loggerController {
    private static Logger logger = LoggerFactory.getLogger(loggerController.class);

    @PostConstruct
    public void print() {
        System.out.println("打印日志");
        logger.info("===info日志===");
        logger.error("===error日志===");
        logger.warn("===warn日志===");
    }
}
